<template>
  <div class="header active">
    <!-- 这是一个公共的导航组件 -->
    <span @click="goBack" class="back"><</span>
    <h3 class="desc_title">{{title}}</h3>
  </div>
</template>

<script>
export default {
  name: "Navbar",
  props: ["title"],
  data() {
    return {};
  },
  methods: {
    goBack() {
      this.$router.go(-1);
    }
  }
};
</script>

<style lang="less" scoped>
.header {
  font-size: 16px;
  color: palevioletred;
  height: 40px;
  width: 100%;
  line-height: 40px;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
}
.active {
  background-color: powderblue;
}
</style>